package com.kele.ioc;

import com.kele.entity.Car;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Version 2019
 * @Author:kele
 * @Date:2021/6/6
 * @Content:
 * @Description：
 */
public class Test {
    public static void main(String[] args) {
        //ApplicationContext applicationContext= new  ClassPathXmlApplicationContext("spring-ioc.xml");
//        Car car = (Car) applicationContext.getBean("car");
//        System.out.println(car);
        ApplicationContext applicationContext=new MyXmlApplicationContext("spring-ioc.xml");
        Car car = (Car) applicationContext.getBean("car");
        System.out.println(car);

    }
}
